/***********************************
* Name: InterComentario.java
* Date: Oct 4, 2010
* @author martin
* Description:
***********************************/

package asmCodeGen;

public class CodeComment implements AsmCode{

    String comment = "";
    boolean tab = false;

    /*****************************************
     * InterEtiqueta
     * constructor
     *****************************************/
    public CodeComment(String comentario){
        this.comment = comentario;
    }

    /*****************************************
     * InterEtiqueta
     * constructor
     *****************************************/
    public CodeComment(String comentario,boolean tab){
        this.comment = comentario;
        this.tab = tab;
    }

    /*****************************************
     * InterEtiqueta
     * constructor
     *****************************************/
    public CodeComment(String comentario, boolean tab, char to_complete, int tam){

        this.comment = to_complete+""+to_complete+""+to_complete+comentario;

        while(this.comment.length() <= tam){
            this.comment+=""+to_complete;
        }

        this.tab = tab;
    }

    /*****************************************
     * getComment
     * @return comment
     *****************************************/
    public String getComment() {
        return this.comment;
    }

    /*****************************************
     * getCodeString
     * @return the complete code of the Cod3Dir
     *****************************************/
    public String getCode() {
        return ((tab)?"\t":"")+";"+this.comment+"";
    }

}
